<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String path = request.getContextPath(); %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <title>注册</title>
    <link href="<%=path%>/login/css/default.css" rel="stylesheet" type="text/css" />
    <!--必要样式-->
    <link href="<%=path%>/login/css/styles.css" rel="stylesheet" type="text/css" />
    <link href="<%=path%>/login/css/demo.css" rel="stylesheet" type="text/css" />
    <link href="<%=path%>/login/css/loaders.css" rel="stylesheet" type="text/css" />
    <style>
        .cc{
            position: absolute;
            bottom: 58px;
            left: 35px;
            width: 250px;
            font-size: smaller;
        }
    </style>
</head>
<body>
<div class='login' style="height: 380px;">
    <div class='login_title'>
        <span>注册</span>
    </div>
    <div class='login_fields'>
        <form method="post" action="<%=path%>/registerSub">
            <%--注册输入表单--%>
        <div class='login_fields__user'>
            <div class='icon'>
                <img alt="" src='img/user_icon_copy.png'>
            </div>
            <input name="realname" id="realname" placeholder='姓名' type='text' />
            <input name="username" id="username" placeholder='账户' maxlength="30" type='text' autocomplete="off"/>
            <input name="password" placeholder='密码' maxlength="16" type='password' autocomplete="off">
            <input name="passwords" placeholder='重复密码' maxlength="16" type='password' autocomplete="off">
            <div class='validation'>
                <img alt="" src='img/tick.png'>
            </div>
        </div>
            <div class='login_fields__password' style="margin: 13px 60px;font-size: 10px;">
                <div class='icon'>
                    <img alt="" src='img/key.png'>
                </div>
                <input type="radio" name="type" value="02" title="普通管理员" checked="">普通管理员
                <input type="radio" name="type" value="03" title="用户">用户
            </div>
        <div class='login_fields__submit'>
            <input type='submit' value='注册'>
        </div>
        </form>
    </div>
    <div class='cc'>
        ${msg}
    </div>
    <div class='disclaimer'>
        <p>欢迎进入失物招领系统，<a href="<%=path%>/gologin" target="_self">登录</a></p>
    </div>
</div>
<div class='authent'>
    <div class="loader" style="height: 44px;width: 44px;margin-left: 28px;">
        <div class="loader-inner ball-clip-rotate-multiple">
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
    <p>认证中...</p>
</div>
<div class="OverWindows"></div>

<link href="layui/css/layui.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="<%=path%>/login/js/jquery.min.js"></script>
<script type="text/javascript" src="<%=path%>/login/js/jquery-ui.min.js"></script>
<script type="text/javascript" src='<%=path%>/login/js/stopExecutionOnTimeout.js?t=1'></script>
<script type="text/javascript" src="<%=path%>/login/layui/layui.js"></script>
<%--<script type="text/javascript" src="<%=path%>/login/js/Particleground.js"></script>--%>
<script type="text/javascript" src="<%=path%>/login/Js/Treatment.js"></script>
<script type="text/javascript" src="<%=path%>/login/js/jquery.mockjax.js"></script>
<script type="text/javascript">
    var canGetCookie = 0;//是否支持存储Cookie 0 不支持 1 支持
    var ajaxmockjax = 1;//是否启用虚拟Ajax的请求响 0 不启用  1 启用
    document.getElementById("realname").style.visibility="hidden";
    $("#username").prop("placeholder","用户名");
    $(function() {
        $(":radio").click(function() {
            var status =  $(this).val();
            if(status=="02"){
                document.getElementById("realname").style.visibility="hidden";
                $("#username").prop("placeholder","用户名");
            }else{
                document.getElementById("realname").style.visibility="visible";
                $("#username").prop("placeholder","学号");
            }
        });
    });
    var CodeVal = 0;
    function showCheck(a) {
        CodeVal = a;
        var c = document.getElementById("myCanvas");
        var ctx = c.getContext("2d");
        ctx.clearRect(0, 0, 1000, 1000);
        ctx.font = "80px 'Hiragino Sans GB'";
        ctx.fillStyle = "#E8DFE8";
        ctx.fillText(a, 0, 100);
    }
    $(document).keypress(function (e) {
        // 回车键事件
        if (e.which == 13) {
            $('input[type="button"]').click();
        }
    });
    //粒子背景特效
    $('body').particleground({
        dotColor: '#E8DFE8',
        lineColor: '#133b88'
    });
    var open = 0;

    function show(status) {
        if(status=="02"){
            $("realname").hide();
        }else{
            $("realname").show();
        }

    }
</script>

</body>
</html>